#include <unistd.h>
#include <mpi.h>
#include <iostream>
using namespace std;

void tst(int& rank, const MPI_Comm& comm)
{
  int get_number, my_number;
  cout << "rank" << rank << ",hello" << endl;	

}

int main(int argc, char * argv[])
{
  int rank;
  int sendbuf, recvbuf;
  MPI_Status status;
  sendbuf = 1; 
  MPI_Init(&argc, &argv);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Sendrecv(&sendbuf, 1, MPI_INT, 0, 99,
	       &recvbuf, 1, MPI_INT, 0, 99,
	       MPI_COMM_WORLD, &status);
  if ( rank == 0)
    cout << recvbuf << endl;
  MPI_Finalize();
  return 0;
}

